package cn.edu.zafu.bigdata.x.wupeng.g;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Copy {
    public static void main(String[] args)  {
        try {
            FileReader in = new FileReader("files/hello.txt");
            FileWriter out = new FileWriter("files/world.txt");
            int c;
            while ((c = in.read())!=-1){
                out.write(c);
            }
            in.close();
            out.close();

        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }catch (IOException e){
            throw new RuntimeException(e);
        }
    }
}
